package sis.ra.founded;

import java.util.HashMap;

import sis.ra.utility.Utils;


public class verbProbobility {
	//PMI=15
	public static HashMap<String, Double> getPMI()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\companylocation_training\\verbweightpmi.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=0;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[1]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	
	//verbpropDistantFreq5.txt
	public static HashMap<String, Double> getVerbsDistantWeighFreq3()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\companylocation_training\\verbweight.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=0;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[1]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	
	//verbpropDistantFreq5.txt
	public static HashMap<String, Double> getVerbsDistantWeighFreq5()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\companylocation_training\\verbweight.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=0;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[1]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	
	//verbPropProductVerbDist.txt
	public static HashMap<String, Double> getVerbsProductDistantWeight()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\companylocation_training\\verbweight.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=1;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[6]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	
	public static HashMap<String, Double> getCompLocDistWeight()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\companylocation_training\\verbweight.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=1;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[5]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	public static HashMap<String, Double> getFreqDistWeight()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\companylocation_training\\verbweight.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=1;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[4])*Double.parseDouble(lines[i].split("\t")[5]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	public static HashMap<String, Double> getFreqWeight()
	{
		HashMap<String, Double> verbs=new HashMap<String, Double>();
		String file="C:\\Documents and Settings\\I820753\\Desktop\\dataset\\companylocation_training\\verbweight.txt";
		String contents=Utils.readFile(file);
	//	System.out.println(contents);
		String [] lines=contents.split("\n");
		for (int i=1;i<lines.length;i++)
		{
			String verb=lines[i].split("\t")[0];
			if (verb.length()<2) continue;
			Double score=Double.parseDouble(lines[i].split("\t")[4]);
			verbs.put(verb, score);
		}
		return verbs;
	}
	public static void main(String[] args) {
		//C:\Documents and Settings\I820753\Desktop\dataset\companylocation_training
	}

}
